import { createRouter, createWebHistory } from 'vue-router'
import Home from '@/views/HomeView.vue'
import Consult from '@/views/ConsultationView.vue'
import Cases from '@/views/CasesView.vue'
import About from '@/views/AboutView.vue'
import Main from '@/views/MainView.vue'
import Product from '@/views/ProductView.vue'
import User from '@/views/UserView.vue'

const routes = [
  {
    path: '/',
    component: Main,
    redirect: '/home',
    children: [
      {path: '/home',name: 'Home',component: Home},
      {path: '/consultation',name: 'Consult',component: Consult},
      {path: '/cases',name: 'Cases',component: Cases},
      {path: '/product',name: 'Product',component: Product},
      {path: '/users',name: 'Users',component: User},
      {path: '/about',name: 'About',component: About}
    ]
  }
]

export const router = createRouter({
  history: createWebHistory(),
  routes
})
